﻿using System;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using CodeCamp.BL.UI;


namespace CodeCamp.Web
{
	public class MvcApplication : HttpApplication
	{
		public static void RegisterRoutes(RouteCollection routes)
		{
			routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

			
			routes.MapRoute("FileInline", "File/{action}/{id}", new {controller = "File", action = "Index", id = Guid.Empty});


			routes.MapRoute(
			               	"Default",
			               	// Route name
			               	"{controller}/{action}/{id}",
			               	// URL with parameters
			               	new {controller = "Home", action = "Index", id = ""} // Parameter defaults
				);
		}

		protected void Application_Start()
		{
			AreaRegistration.RegisterAllAreas();
			RegisterRoutes(RouteTable.Routes);

			MvcMenu.RegisterMenuItems(typeof(MvcApplication));
		}
	}
}